package com.srit.migration.business.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

import com.srit.base.bean.Page;
import com.srit.base.dao.SqlMapDao;
import com.srit.migration.business.bean.DbTableSpace;
import com.srit.migration.business.dao.DbTableSpaceDao;

/**
 * @author guan
 * @by daoImpl.tem
 * 
 */
 @Service
public class DbTableSpaceDaoImpl implements DbTableSpaceDao {
	@Autowired(required = true)
	private SqlMapDao sqlMapDao;

	@Override
	public void save(DbTableSpace dbTableSpace) {
		sqlMapDao.save("DbTableSpace.save", dbTableSpace);
	}

	@Override
	public void update(DbTableSpace dbTableSpace) {
		sqlMapDao.update("DbTableSpace.save", dbTableSpace);
	}

	@Override
	public DbTableSpace getById(DbTableSpace dbTableSpace) {
		return (DbTableSpace) sqlMapDao.getById("DbTableSpace.getById", dbTableSpace.getId());
	}

	@Override
	public void delete(DbTableSpace dbTableSpace) {
		sqlMapDao.delete("DbTableSpace.delete", dbTableSpace);
	}

	@Override
	public void page(Page page) {
		sqlMapDao.queryForObject("DbTableSpace.page", page);
	}
	
	@Override
	public void batchSave(List<DbTableSpace> dbTableSpaceList) {
		sqlMapDao.batchSave("DbTableSpace.batchSave", dbTableSpaceList);

	}

	@Override
	public List list(Page page) {
		return sqlMapDao.queryForList("DbTableSpace.list", page);

	}

}
